Strict HTML Declarations


The strict mode checking of HTML is to verify that only recommended idioms are used in the HTML document. These idioms are used to gauruantee that an HTML document's structure is not compromised. Here is a list of the recommended idioms:

No text outside of paragraph elements

This means that document text must be an element of a block container. The most common error is:

 
	<HTML>
	<BODY>
	Give me liberty, or give me death!
	</BODY>
	</HTML>

To be valid in strict mode, this could be:

 
	<HTML>
	<BODY>
	<P>Give me liberty, or give me death!</P>
	</BODY>
	</HTML>

Here's a list of block containters for HTML 2.0:

Here's a additional list of container elements for HTML 3.0:

No obsolete nor deprecated elements are used

This includes elements such as <XMP> and <LISTING>.

Anchor elements contain only inline markup

This includes elements such as <B>, <CODE>, and <IMG>. This excludes elements such as <H1>-<H6>, <BLOCKQUOTE>, and <P>.

For example, this is not valid in strict mode:

<A HREF="foo.html"><H1>Foo is best!</H1></A>

To be valid, write it like this:

<H1><A HREF="foo.html">Foo is best!</A></H1>

Anchor names are unique and begin with a letter

For example, this is not valid HTML in strict mode:

<A HREF="12">Chapter 12</A>

This is an example of a valid anchor name specification:

<A HREF="Chap12">Chapter 12</A>


HTML 2.0 Checked! Last updated and validated Thu 13 Jul 95 by markg@hal.com